﻿using ProgrammingEducationSystem.Models;

namespace ProgrammingEducationSystem.Services.IServices
{
    //课时接口
    public interface ICourseHoursService
    {
        //查询
        /// <summary>
        /// 通过课时Id查询课时
        /// </summary>
        /// <param name="courseHourId"></param>
        /// <returns></returns>
        Task<CourseHour> GetByIdAsync(Guid courseHourId);

        /// <summary>
        /// 通过学生Id查询某个学生的所有课时
        /// </summary>
        /// <param name="stuId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByStuIdAsync(string stuId);

        /// <summary>
        /// 通过学生Id查询某个学生的所有已经下课的课时
        /// </summary>
        /// <param name="stuId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByStuIdAndExpiredAsync(string stuId);

        /// <summary>
        /// 通过学生Id查询某个学生的所有没有开始的课时
        /// </summary>
        /// <param name="stuId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByStuIdAndNotExpiredAsync(string stuId);

        /// <summary>
        /// 查询某个学生正在上的课时
        /// </summary>
        /// <param name="stuId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByStuIdAndIngAsync(string stuId);

        /// <summary>
        /// 通过老师Id查询某个老师的所有课时
        /// </summary>
        /// <param name="stuId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByTeaIdAsync(string teaId);

        /// <summary>
        /// 通过老师Id查询某个老师的所有已经下课的课时
        /// </summary>
        /// <param name="teaId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByTeaIdAndExpiredAsync(string teaId);
        /// <summary>
        /// 通过老师Id查询某个老师的所有没有开始的课时
        /// </summary>
        /// <param name="teaId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByTeaIdAndNotExpiredAsync(string teaId);

        /// <summary>
        /// 通过老师Id查询某个老师的所有正在上课的课时
        /// </summary>
        /// <param name="teaId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByTeaIdAndIngAsync(string teaId);


        /// <summary>
        /// 通过班级Id查询课时
        /// </summary>
        /// <param name="classId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByClassIdAsync(Guid classId);

        /// <summary>
        /// 通过班级Id查询已经下课的课时
        /// </summary>
        /// <param name="classId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByClassIdAndExpiredAsync(Guid classId);

        /// <summary>
        /// 通过班级Id查询没有开始的课时
        /// </summary>
        /// <param name="classId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByClassIdAndNotExpiredAsync(Guid classId);

        /// <summary>
        /// 通过班级Id查询正在上课的课时
        /// </summary>
        /// <param name="classId"></param>
        /// <returns></returns>
        Task<List<CourseHour>?> GetByClassIdAndNotIngAsync(Guid classId);



        //新增

        /// <summary>
        /// 新增课时
        /// </summary>
        /// <param name="courseHour"></param>
        /// <returns></returns>
        Task AddAsync(CourseHour courseHour);

        //删除
        /// <summary>
        /// 删除某个课时 ==》级联删除配套学习资源
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(Guid id);

        //更新

        void UpdateAsync(CourseHour courseHour);

        Task<bool> SaveAsync();
    }
}
